home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr47 / wasm223.zip / STEST.C < prev    next >
Text File  |  1993-05-04  |  714b  |  42 lines

  1. /*
  2. ** This Turbo C program uses the Load and
  3. ** Store routines defined in STORE.ASM
  4. **
  5. ** Compile with:
  6. **
  7. **   WASM store store.obj
  8. **   TCC stest store.obj
  9. **
  10. ** Note: This C program should be
  11. ** compiled using a far code model
  12. ** (medium, large, or huge).
  13. */
  14.  
  15. #include <stdlib.h>
  16. #include <stdio.h>
  17.  
  18. /* define external functions */
  19.  
  20. #ifdef __cplusplus
  21. extern "C" {
  22. void pascal Store (int v);
  23. int pascal Load (void);
  24. }
  25. #else
  26. void pascal Store (int v);
  27. int pascal Load (void);
  28. #endif
  29.  
  30. /* test program */
  31.  
  32. int main()
  33. {
  34.   int i;
  35.  
  36.   i = random (32001);
  37.   printf ("The number stored is %i\n", i);
  38.   Store (i);
  39.   printf ("The number retrieved is %i\n", Load());
  40.   return 0;
  41. }
  42.